home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Agent Central Host Computer
/
Agent - Central Host Computer.iso
/
_SETUP.1
/
vsurveyaa_rrsum.sql
< prev
next >
Wrap
Text File
|
2000-05-12
|
2KB
|
39 lines
CREATE OR REPLACE VIEW VSURVEYAA_rrsum AS
SELECT TRUNC(DRIVER_CONTEXT.rte_date) survey_day,
BUS.BUS_ID,
DRIVER_CONTEXT.route_id,
DRIVER_CONTEXT.run_id,
DRIVER_CONTEXT.trip_id,
OPERATOR_CONTEXT.user_id,
TRIPS.direction1, TRIPS.direction2,
TRIPS.dep_time, TRIPS.mileage,
TRIPS.route_desc,
FAREENTR.fare_id,
FARETABLE.PASSENGERS,
RPTFAREMAP.rptclass , vrpt4headers.h1,
vrpt4headers.h2, vrpt4headers.h3, vrpt4headers.h4 , RPTNAMES.SHORT_NAME
FROM FARE_CONTEXT, DRIVER_CONTEXT, OPERATOR_CONTEXT, TRIPS, BUS, FAREBOX, FAREENTR,
FARETABLE, FARECLASSES,
RPTFAREMAP, RPTNAMES, vrpt4headers
WHERE
TRIPS.id = DRIVER_CONTEXT.trip_id AND
TRIPS.runid = DRIVER_CONTEXT.run_id AND
TRIPS.routeid = DRIVER_CONTEXT.route_id AND
FARE_CONTEXT.driver_context_id = DRIVER_CONTEXT.driver_context_id AND DRIVER_CONTEXT.op_context_id = OPERATOR_CONTEXT.op_context_id AND
FARE_CONTEXT.fare_context_id = FAREENTR.fare_context_id AND
OPERATOR_CONTEXT.CONFIG_NUM = TRIPS.CONFIG_NUM AND
OPERATOR_CONTEXT.farebox_glid = FAREBOX.glid AND
BUS.glid = FAREBOX.location
AND FARETABLE.fareset = FARE_CONTEXT.fareset_id AND
FARETABLE.fare = FAREENTR.fare_id AND
FARETABLE.config_num = OPERATOR_CONTEXT.config_num AND
FARETABLE.class_num = FARECLASSES.class_num AND
FARETABLE.config_num = FARECLASSES.config_num AND
RPTFAREMAP.fareset_id = FARE_CONTEXT.fareset_id AND
RPTFAREMAP.fare_id = FARETABLE.fare AND
RPTFAREMAP.config_num = FARECLASSES.config_num AND
RPTFAREMAP.REPORT_INDX = RPTNAMES.REPORT_INDX AND
vrpt4headers.SHORT_NAME = RPTNAMES.SHORT_NAME AND
RPTNAMES.short_name= 'SURVRRSUM'